package com.yc.services;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单查询视图对象，用于封装分页和查询条件
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrdersQueryVO extends Page implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long userId; // 用户ID
    private Integer orderStatus; // 订单状态
    private Long orderId; // 订单ID

    // 排序字段
    private String sortField;
    // 排序顺序
    private String sortOrder;

    // 时间范围查询
    private LocalDateTime startTime;
    private LocalDateTime endTime;

    public OrdersQueryVO() {
        // 默认分页参数
        super(1, 10); // 默认第一页，每页10条
    }
}